PHP implementation of the method to get the domain name summary, PHP get the domain name summary
This paper summarizes the method of getting the domain
PHP get domain name and domain name IP method
Recently in a project to use to obtain the domain name and IP functions, roughly the following methods.
The method of acquiring the
Global array
echo $_server["Http_host"];
The bbs.it-home.org will be output.
Copy CodeLocal tests will output localhost.Method 2, using the Parse_url function;
";p Rint_r ($arr); echo"";? >The output is an array with the result:Array ([scheme] = Http[host] [Bbs.it-home.org[path] =/index.php[query] = referer=jbxue.com)Description: Scheme corresponds to the protocol, the host corresponds to the domain
Using file_get_contents on PHP CentOS to get the domain name on this computer will return FALSE for example, a CentOS server is bound with the domain name www.jitapu.me. Getting www.jitapu.me content in PHP will return false.
Like what
Other external
Get an IP address with a domain name or get a domain name with IP#include #include Convert network address to integer typestruct IN_ADDR IP; ip.s_addr=16885952; printf ("%s\n", Inet_ntoa (IP));Converting an integral type to a netw
Get an IP address with a domain name or get a domain name with IP#include #include //translates the network address into an integer struct in_addr ip; ip.s_addr=16885952; printf ("%s\n", Inet_ntoa (IP)), //converts an integral t
function | file name
#region get the function of domain name, directory, file name in the URL
public string Geturldomainname (string strhtmlpagepath){String p = @ "http://[^\.] *\. (? Regex reg = new regex (p,regexoptions.ignorecase);Match m = Reg. Match (Strhtmlpagepath);re
Get the local IP address, Mac, get the corresponding IP through the domain name,Is the more common operation that network programming may encounter, so it is summarized as follows (3 functions are encapsulated),Directly on the code :#include Test RunThe results are as follows:Linux C Network Programming-
Js get item primary domain name and get uri parameter parse return result gadgets, jsuri
Function getImgDomain () {return "http://imgupload.youboy.com/";}/** get root directory **/function getRootPath () {// get the current URL
[URGENT !] What should I do if I want to use get to get URL variables, but the server prompts that the domain name does not actually exist and cannot be accessed? Http://iqs.ctgu.edu.cn/lost/register.phpamp;action=activationamp;auth=688fCtlTO5JS+kJAa/Z8vEK+6bOwGjdDci/VsMB [URGENT !] What should I do if I want to use
-dns-a.google.com Sql> Select Utl_inaddr.get_host_name (' 10.80.18.210 ') from dual;Select Utl_inaddr.get_host_name (' 10.80.18.210 ') from dual*ERROR at line 1:Ora-29257:host 10.80.18.210 UnknownOra-06512:at "SYS. Utl_inaddr ", line 4Ora-06512:at "SYS. Utl_inaddr ", line 35Ora-06512:at Line 1 Sql> Select Utl_inaddr.get_host_name (' 10.80.19.210 ') from dual;Select Utl_inaddr.get_host_name (' 10.80.19.210 ') from dual*ERROR at line 1:Ora-29257:host 10.80.19.210 UnknownOra-06512:at "SYS. Utl_
, usually referred to as an alias pointing. Here, you can define a host alias, such as setting FTP. ***. com to point to a host www. ***. com, you can use ftp later. ***. com instead of accessing www. ***. com.
MX recordMX record is also called mail route record. You can direct the mail server under this domain name to your own mail server, and then you can control all mailbox settings on your own. You on
Lead : "Business Weekly" website published an analysis of the article said that the vast majority of good domain names have been registered, then how should entrepreneurs get the best domain name? Experts suggest that the entrepreneur should first determine the company name,
Php obtains the summary of root domain names. Php obtains the root domain name summary. if you only get the domain name currently accessing your page, you only need to use the HTTP_HOST function in php, if the root
If you simply get the current access to your page's domain name, we only need to use PHP function Http_host can be done, if it is to extract the URL root domain name is required regular, below to look at a few concrete examples.
It is very simple to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.